package com.gh.util;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author Eric
 * @Date 2021/9/11 8:46
 * @Version 1.0
 */
@Data
@Component
@ConfigurationProperties(prefix = "aliyun.sms")
public class ConstantPropertiesUtils implements InitializingBean {

    private String regionId;
    private String accessKeyId;
    private String secret;

    public static String REGION_ID;
    public static String ACCESS_KEY_ID;
    public static String SECRET;
    @Override
    public void afterPropertiesSet() throws Exception {
        REGION_ID = regionId;
        ACCESS_KEY_ID = accessKeyId;
        SECRET = secret;
    }
}
